package com.mentalhealth.diary.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mentalhealth.diary.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 用户表Mapper接口
 * 继承BaseMapper提供基础CRUD操作
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {
    
    /**
     * 根据手机号查询用户
     * @param phone 手机号
     * @return 用户信息
     */
    @Select("select * from user where phone = #{phone}")
    User selectByPhone(String phone);
    
    // BaseMapper已包含常用的CRUD方法
}